#ifndef LIB_UTILS_PIXMAPTEXTOBJECT_H
#define LIB_UTILS_PIXMAPTEXTOBJECT_H

#include "../utils_global.h"
#include <QTextObjectInterface>
#include <QObject>
namespace TWUtils {
namespace UI {

	class TWUTILS_EXPORT PixmapTextObject : public QObject, public QTextObjectInterface
	{
		Q_OBJECT
		Q_INTERFACES(QTextObjectInterface)

		public:
			enum {PixmapTextFormat = QTextFormat::UserObject + 1};
			enum PixmapProperty{DefaultIcon = 1};

			QSizeF intrinsicSize(QTextDocument *doc, int posInDocument, const QTextFormat &format);
			void drawObject(QPainter *painter, const QRectF &rect,
							QTextDocument *doc, int posInDocument, const QTextFormat &format);
	};
}
}
#endif // MESSAGEICONTEXTOBJECT_H
